import { ref } from 'vue'
import { defineStore } from 'pinia'
import { http } from '@/utils/requestGitee'

export const useUser = defineStore('user', () => {
  const user = ref<any>({})
  function getUserInfo() {
    http.get('https://gitee.com/api/v5/user').then((res) => {
      user.value = res
    })
  }
  return { user, getUserInfo }
})
